home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / bazooka.tik < prev    next >
Encoding:
Text File  |  2002-10-21  |  7.2 KB  |  295 lines

  1. TIKI
  2. setup
  3. {
  4.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  5.     path models/weapons/bazooka
  6.     skelmodel bazooka.skd
  7.     surface bazooka shader bazooka
  8.     surface bazookarim shader bazookarim
  9.     surface bazookashell shader bazookashell
  10. }
  11.  
  12. init
  13. {
  14.     server
  15.     {
  16.         classname        Weapon
  17.         weapontype        heavy
  18.         name            "Bazooka"
  19.         rank            610 610
  20.  
  21.         pickupsound            bazooka_snd_pickup
  22.         ammopickupsound        bazooka_snd_pickup_ammo
  23.         noammosound            bazooka_snd_noammo
  24.         maxmovementsound    bazooka_snd_noammo
  25.  
  26.         // Holstering info
  27. //        holstertag        "Bip01 Spine2"
  28. //        holsteroffset    "8.0 -7.75 6.5"
  29. //        holsterangles    "0 185 -25"
  30. //        holsterScale    1.0
  31.  
  32.         // Primary fire type info
  33.         firetype            projectile
  34.         ammotype            "heavy"
  35.         semiauto
  36.         clipsize            1
  37.         ammorequired        1
  38.         firedelay            1.0
  39.         crosshair            1
  40.  
  41.         sp startammo        3
  42.         sp projectile        models/projectiles/bazookashell.tik
  43.         sp bulletspread        5 5 500 500
  44.  
  45.         sp movementspeed    0.8
  46.         sp maxfiremovement    0.2
  47.  
  48.  
  49.         cache            models/projectiles/bazookashell.tik
  50.         cache            models/projectiles/bazookashell_dm.tik
  51.  
  52.         // AI animation group info
  53.         weapongroup        bazooka
  54.         airange            medium
  55.  
  56.         //=================================
  57.         // DM Attributes
  58.         dm startammo        8
  59.         dm projectile        models/projectiles/bazookashell_dm.tik
  60.         dm bulletspread        5 5 500 500
  61.  
  62.         dm movementspeed    0.75
  63.         dm maxfiremovement    0.2
  64.  
  65.         // Additional DM Loadout
  66.         dm additionalstartammo "grenade" 1
  67.         dm additionalstartammo "smokegrenade" 3
  68.         dm startitem "items/binoculars.tik"
  69.  
  70.         // Additional DM Realism Loadout
  71.         dmrealism additionalstartammo "grenade" 1
  72. //        dmrealism additionalstartammo "smokegrenade" 3
  73.         dmrealism startitem "items/binoculars.tik"
  74.  
  75.         //=================================
  76.         // Realism Attributes
  77.         sprealism startammo        3
  78.         dmrealism startammo        6
  79.         realism projectile        models/projectiles/bazookashell_dm.tik
  80.         realism bulletspread        5 5 545 545
  81.  
  82.         realism movementspeed    0.75
  83.         realism maxfiremovement    0.2
  84.  
  85.         // this is attached to the player during reload
  86.         cache models/ammo/bazooka_shell.tik
  87.  
  88.         surface bazookashell +nodraw
  89.     }
  90.     client
  91.     {
  92. //        cache muzsprite.spr
  93.         cache vsssource.spr
  94. //        cache models/fx/muzflash.tik
  95.     }
  96. }
  97.  
  98. animations
  99. {
  100.     raise    bazooka.skc
  101.     {
  102.         // make sure the shell in the end is not there
  103.         server
  104.         {
  105.             entry surface bazookashell +nodraw
  106.             last idle
  107.         }
  108.     }
  109.     idle    bazooka.skc
  110.     {
  111.         // make sure the shell in the end is not there
  112.         server
  113.         {
  114.             first surface bazookashell +nodraw
  115.         }
  116.     }
  117.     reload     bazooka_reload.skc
  118.     {
  119.         server
  120.         {
  121.             0 surface bazookashell +nodraw
  122.             75 surface bazookashell -nodraw
  123.             last surface bazookashell +nodraw
  124.             last idle
  125.         }
  126.         client
  127.         {
  128.             entry sound bazooka_snd_reload
  129.         }
  130.  
  131.     }
  132.     fire    bazooka.skc
  133.     {
  134.         server
  135.         {
  136.             entry shoot
  137.             entry surface bazookashell +nodraw
  138.         }
  139.         client
  140.         {
  141.             entry stopaliaschannel bazooka_snd_fire
  142.             entry sound bazooka_snd_fire
  143.  
  144.             // By now, the server has already fired the weapon, so it's
  145.             // ok to apply the view kick apon entry to avoid problems
  146.             // with multiple application on single frame animations.
  147.  
  148.             ////////////////////////////////////////////////////////////////////////////////////////
  149.             // View Kicking
  150.             //
  151.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  152.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  153.             // will be explained.
  154.             // Scatter Patterns:
  155.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  156.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  157.             //
  158.             //
  159.             //                     +-------------------------------------------- Scatter Pitch Min
  160.             //                      |    +--------------------------------------- Scatter Pitch Max
  161.             //                      |    |       +------------------------------- Scatter Yaw Min
  162.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  163.             //                     |    |       |   |     +--------------------- The Recentering speed in degrees per second
  164.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  165.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  166.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  167.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  168.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  169.             //                      |    |       |   |     |    |     |  | |      purely random.
  170.             //                V    V       V   V     V    V     V  V V
  171. //            entry viewkick         -28.5 -28.5   -0.05 0.05 56  "T"   15 15 15
  172.             entry viewkick           0    0   -0.05 0.05 56  "T"   15 15 15
  173.  
  174. //            entry viewkick -15 -16   -10 -11
  175.  
  176.             // muzzle flash
  177.             entry tagdlight tag_barrel 0.25 0.2 0.15 140 0.11
  178. //            entry tagspawnlinked tag_barrel
  179. //            (
  180. //                model models/fx/muzflash.tik
  181. //                color 1.00 1.00 1.00
  182. //                scale 0.30
  183. //                life 0.05
  184. //                scalerate 2.00
  185. //                velocity 1000.00
  186. //                offsetalongaxis 0 0 0
  187. //                angles 0 0 220
  188. //                avelocity 0 0 crandom -7000
  189. //                fade
  190. //                alignstretch 0.15
  191. //                randomroll
  192. //            )
  193.  
  194.             // smoke out the front
  195.             entry tagspawn tag_eject
  196.             (
  197.                 model vsssource.spr
  198.                 count 1
  199.                 alpha 0.70
  200.                 color 0.30 0.30 0.30
  201.                 spritegridlighting
  202.                 life 1.20
  203.                 scalerate 5.00
  204.                 cone 10.00 10.00
  205.                 velocity -800.00
  206.                 randvel 0 40 0
  207.                 friction 4.00
  208.                 fade
  209.                 fadein 0.2
  210.                 fadedelay 0.4
  211.             )
  212.  
  213.             // more smoke out the front
  214.             entry tagspawn tag_eject
  215.             (
  216.                 model vsssource.spr
  217.                 count 1
  218.                 alpha 0.70
  219.                 color 0.30 0.30 0.30
  220.                 spritegridlighting
  221.                 life 1.20
  222.                 scale 0.8
  223.                 scalerate 4.00
  224.                 cone 10.00 10.00
  225.                 velocity -600.00
  226.                 randvel 0 40 0
  227.                 friction 4.00
  228.                 fade
  229.                 fadein 0.2
  230.                 fadedelay 0.4
  231.             )
  232.  
  233.             // smoke out the back
  234.             entry tagspawn tag_barrel
  235.             (
  236.                 model vsssource.spr
  237.                 count 1
  238.                 alpha 0.70
  239.                 color 0.30 0.30 0.30
  240.                 spritegridlighting
  241.                 life 1.40
  242.                 scalerate 8.00
  243.                 velocity -800.00
  244.                 randvel 0 40 0
  245.                 friction 4.00
  246.                 fadein 0.1
  247.                 fadedelay 0.3
  248.             )
  249.  
  250.             // more smoke out the back
  251.             entry tagspawn tag_barrel
  252.             (
  253.                 model vsssource.spr
  254.                 count 1
  255.                 alpha 0.70
  256.                 color 0.30 0.30 0.30
  257.                 spritegridlighting
  258.                 life 1.40
  259.                 scale 0.8
  260.                 scalerate 7.00
  261.                 velocity -600.00
  262.                 friction 4.00
  263.                 fadein 0.1
  264.                 fadedelay 0.3
  265.             )
  266.  
  267. //            entry tagspawnlinked tag_eject
  268. //            (
  269. //                model muzsprite.spr
  270. //                count 1
  271. //                alpha 0.90
  272. //                color 1.00 1.00 1.00
  273. //                life 0.20
  274. //                scalerate 7.00
  275. //                cone 8.00 2.00
  276. //                velocity 700.00
  277. //                radialvelocity -10.00 1.00 30.00
  278. //                randvelaxis range 30 -708 range -70 60 crandom -40
  279. //                friction 2.00
  280. //                offsetalongaxis 133 0 0
  281. //                angles 80 80 8
  282. //                avelocity 60 60 random 6
  283. //                scalemin 1.00
  284. //                scalemax 1.40
  285. //                fade
  286. //                randomroll
  287. //            )
  288.         }
  289.     }
  290. }
  291.  
  292. /*QUAKED addon_playerweapon_allied_bazooka (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  293. Weapon - bazooka - US bazooka.
  294. */
  295.